<template>
  <div class="col-md-8">
    <h3 class="reply">评论回复：</h3>
    <h2 v-if="comment.length===0">暂无评论，点击左侧添加评论！！！</h2>
    <ul class="list-group">
      <Item v-for="(comment,index) in comment" :key="index" :comment="comment" :deleteComment="deleteComment" :index="index"/>
    </ul>
  </div>
</template>

<script>
import Item from './Item.vue'
export default {
  name: 'List',
  // 声明接收属性 : 这个属性就会成为组件对象的属性
  props: ['comment', 'deleteComment'],
  components: {
    Item
  }
}
</script>

<style scoped>
  @import '../../../static/css/bootstrap.css';
  .reply {
    margin-top: 0px;
  }
</style>
